package locations.actions;

import java.util.ArrayList;
import java.util.List;
import com.opensymphony.xwork2.ActionSupport;
import locations.dao.implement.ProblematicTypeDAOHibernateJPA;
import locations.model.TipoProblematica;

public class ProblematicTypeIndexAction extends ActionSupport
{
	private String pageTitle = "Listado de tipos de problematica";
	private List<TipoProblematica> problematicTypes = new ArrayList();
	
	public String execute() throws Exception
        {
		ProblematicTypeDAOHibernateJPA dao = new ProblematicTypeDAOHibernateJPA();
		this.setProblematicTypes(dao.retrieveAll());
		return SUCCESS;
	}

	public String getPageTitle()
        {
		return pageTitle;
	}

	public void setPageTitle(String pageTitle)
        {
		this.pageTitle = pageTitle;
	}

	public List<TipoProblematica> getProblematicTypes()
        {
		return problematicTypes;
	}

	public void setProblematicTypes(List<TipoProblematica> problematicTypes)
        {
		this.problematicTypes = problematicTypes;
	}


	
	
	
}
